#ifndef UNIT_MODIFICATION_HPP_INCLUDED
#define UNIT_MODIFICATION_HPP_INCLUDED

#include <boost/shared_ptr.hpp>

#include "unit_category.hpp"
#include "wml_node_fwd.hpp"

namespace game {

class unit_modification;
typedef boost::shared_ptr<unit_modification> unit_modification_ptr;
typedef boost::shared_ptr<const unit_modification> const_unit_modification_ptr;

class unit;

class unit_modification
{
public:
	static unit_modification_ptr create(wml::const_node_ptr node);
	explicit unit_modification(wml::const_node_ptr node);

	const std::string& description() const { return description_; }

	int attack() const { return attack_; }
	int defense() const { return defense_; }

	bool applies(const unit& user, const unit& against) const;

private:
	std::string description_;
	UnitCategory applies_against_;
	int attack_;
	int defense_;
};

}

#endif
